package com.zytech.zspider.task.event;

import com.zytech.zspider.core.TaskDefinition;
import com.zytech.zspider.eventbus.Event;

/**
 * @author siuming
 */
public class TaskFailedEvent implements Event {
    private static final long serialVersionUID = -6949228332934970677L;

    private final TaskDefinition task;
    private final String reason;

    /**
     * @param task
     * @param reason
     */
    TaskFailedEvent(TaskDefinition task, String reason) {
        this.task = task;
        this.reason = reason;
    }

    /**
     * @return
     */
    public TaskDefinition getTask() {
        return task;
    }

    /**
     * @return
     */
    public String getReason() {
        return reason;
    }
}
